home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 355 / source / oops_js / read.me < prev    next >
Text File  |  1990-02-02  |  5KB  |  96 lines

  1.     OOPS is an enhanced version of ERROUT, which was included with the first
  2. beta release of JS Modula. OOPS takes the compiler-generated ERR.DAT and 
  3. ERR.LST files, and flags the errors in your source file, including error 
  4. messages(!). ERROUT had some nasty tendencies: it only wrote a file called
  5. ERR.OUT, and would overwrite an old ERR.OUT if one existed. It only output
  6. error numbers, which meant an annoying trip to the ERRLIST.DOK file to see
  7. what had gone wrong. It was not intended to be a complete error reporter;
  8. OOPS should do the job.
  9.  
  10. USAGE NOTES:
  11.     I have included all the source files and library object modules you'll
  12. need to do whatever you want with OOPS. I have also included sample
  13. ERR.DAT and ERR.LST files for JUNK.MOD, so you can run OOPS to see what it
  14. does. It should read and delete the ERR files, and rewrite the source file
  15. with errors flagged (*<@*), and the error message(s) on the line(s) following
  16. the error(s).
  17.     To use it after a compile that results in the "errors detected" message,
  18. just run OOPS from the same directory as the ERR.DAT, ERR.LST and source
  19. files. Reload your source into your text editor, and look for the @ signs.
  20. Error messages all start with ^^^ to indicate the line in which the error
  21. was detected. The program limits itself to flagging 5 errors in a line,
  22. and is currently not able to check multiple files (* maybe someday... *).
  23. Only the last file of a multi-file compile is left in ERR.DAT, so you are
  24. limited to single file compiles (* unless you're _sure_! *).
  25.  
  26. By the way, library source material included here is...
  27.  
  28. (*======================================================*)
  29. (*       Copyright (c) 1987, JEFFERSON SOFTWARE     *)
  30. (*   12416 N 28th Dr #18-236, Phoenix, AZ  85029-2434    *)
  31. (*   (602)243-3106   CIS: 73637,1245; GEnie: JSMODULA    *)
  32.  
  33. (* PHASE BBS (602)849-1287 (up to 2400 baud) has source *)
  34. (* and answers about Jefferson Software Modula in SIG 8 *)
  35.  
  36. (*    Permission to use this source is given to all who    *)
  37. (* agree  to  include  Jefferson  Software's  copyright    *)
  38. (* notice,  address,  and phone number in all copies of    *)
  39. (* this source or source derived from this source.    *)
  40. (*    Please send any changes, updates or bugs to us at    *)
  41. (* Jefferson Software.  If  you  have  code you want to    *)
  42. (* share with us all,  send it and any documentation to    *)
  43. (* us. Please tell us if you want your name included.    *)
  44. (*                            *)
  45. (*    PERMISSION TO USE THIS SOURCE DOES NOT INCLUDE    *)
  46. (*   USING OR MODIFYING IT FOR DIRECT COMMERCIAL GAIN    *)
  47. (*======================================================*)
  48.  
  49.  
  50. IMPLEMENTATION NOTES:
  51.     While developing this program, I discovered some very interesting things
  52. you may want to try with the libraries. Included in the archive are hacked
  53. source files for 2 library modules, System and FileSystem. By removing the
  54. unneeded calls to System (HALTX) from FileSystem, I was able to cut over
  55. 6k from the final product, by eliminating the need to link FPSys,
  56. GEMDOSProcess, and XBIOSMisc to oops. All the object files needed to link
  57. together oops are included, but remember that System and FileSystem are
  58. cut-down versions. (* VERY cut down in the case of System! *) You need
  59. to compile the errmsg files too, DEFs first, and errmsg1 before the others.
  60.     Library hacking is a good way to cut your runtime programs down to size.
  61. All you need to do is trace the dependencies back and find out where the
  62. cutting will do the most good. If there's any way to eliminate System, you
  63. too will save the 6k+ of overhead it generates. I left the other modules
  64. alone, as they are mostly small procedures which call smaller procedures
  65. including mostly INLINE code. You must include the dummy System module,
  66. though; even if you eliminate all the calls to System, the linker still
  67. looks for it automatically. 
  68.     As previously noted, the old ERROUT would overwrite an existing file
  69. if one existed, leaving the leftovers at the end of the file. This was due
  70. to a limitation in FileSystem (Lookup): if you specified a New file, and
  71. Lookup found one, it opened the old one and didn't tell you whether it had
  72. actually created a file. This was fixed by adding the result code "callerror"
  73. for this circumstance. Now if you specify a new file on a Lookup call, and
  74. it opens the old file, the file.result will be callerror. You may ignore
  75. it if you please, but if you really want a new file, Delete the old one, and
  76. call lookup again to create a new file.
  77.     About those ERRMSG files...
  78. I went ten rounds with the compiler trying to put all the error messages in
  79. the main module of oops, and the compiler won. There is a limit of 127 cases
  80. (the first thing I tried), and also a limit on string constants (not sure,
  81. but my guess would be 127 for this one too). Another odd error I got was
  82. "program too long", but I think that was a fluke. The bottom line is, I had
  83. to split up all those constants into 3 modules, and IMPORT them into the
  84. main module. I also had to import the type of the array containing all the
  85. error messages, it is declared in the first errmsg file (ERRMSG1.DEF), and
  86. IMPORTed everywhere else. All that just to avoid reading in an error file.
  87. (* I like self-contained programs *)
  88.  
  89.     I hope all you JS Modula users out there find this one useful.
  90.  
  91.  
  92. Enjoy!
  93.           Ken Badertscher (KBAD) 2/22/87
  94.  
  95.  
  96.